######################################################################
# Bit serial top-level ModelSim do file
# Stephen West, James Carroll
# BYU ECEn 620, Fall 2008
######################################################################

# Note: this doesn't work; instead, we demonstrate functionality 
# with PE.do

quit -sim
vcom BitSerialTop.vhd
vcom *.vhd

vsim BitSerialTop

add wave clk
add wave *
#add wave -color blue lsb_in
#add wave -group config config_ctrl_in config_data(15) index_data code/index_data code/index code/CodeBook(15) code/ns code/counter_word
#add wave -group default_values error_in index_in
#add wave -color "steel blue" code/cs
#add wave -color orange pixels_in
#add wave -color red sub_out
#add wave -color red sub_lsb
#add wave -color "indian red" abs_out
#add wave -color "indian red" abs_lsb
#add wave -color "sienna" sum_out
#add wave -color "sienna" sum_lsb
#add wave error_delay
#add wave lesser_error
#add wave this_is_lesser
#add wave lesser/*
#add wave index_in_delay
#add wave index_this_delay
#add wave -group output pixels_out error_out index_out lsb_out


force clk 1,0 10ns -r 20ns
run 2ns
force lsb_in 0

force config_ctrl_in 0 
force index_data 0
force config_data 0000000000000000
run 40 ns

force config_ctrl_in 1,0 20ns
force index_data 1,0 20ns
#force config_data 1111111111111111,0000000000000000 40ns
force config_data 1010101010101010
run 20 ns
#force index_data 1,0 20ns

force config_data 1100110011001100
run 20 ns
force config_data 1111000011110000
run 20 ns
force config_data 1111111100000000
run 20 ns
force config_data 0000000000000000
run 20 ns
force config_data 0000000000000000
run 20 ns
force config_data 0000000000000000
run 20 ns
force config_data 0000000000000000
run 20 ns
force config_data 0000000000000000
run 20 ns
force config_data 0000000000000000
run 20 ns
force config_data 0000000000000000
run 20 ns

#extra stuffs
force config_data 1100111111111111
run 20 ns 
force config_data 1101000000000001
run 20 ns
force config_data 1100111111111111
run 20 ns 
force config_data 1101000000000001
run 20 ns


force lsb_in 1,0 20ns -r 240ns
force error_in 1,0 220ns
force index_in 1
force pixels_in 0000000000000000
run 20 ns
force lsb_in 0
run 240 ns
run 240 ns
run 240 ns
